/*
 * @Author: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @Date: 2024-03-06 15:58:52
 * @LastEditors: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @LastEditTime: 2024-03-06 20:54:16
 * @FilePath: \hrManage\src\api\permission.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import instance from '@/utils/request'
export const getPermission = () => {
  return instance.get('/sys/permission')
}

export const addPermission = (data) => {
  return instance.post('/sys/permission', data)
}

export const removePermission = (id) => {
  return instance.delete(`/sys/permission/${id}`)
}

export const getPermissionDetail = (id) => {
  return instance.get(`/sys/permission/${id}`)
}

export const updatePermission = (data) => {
  return instance.put(`/sys/permission/${data.id}`, data)
}
